package com.hntech.base.grammar.lamba;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @Autho changqi.wu
 * @Date 路在脚下，使劲踩！
 */
public class LamdaExp {

    private static Collection collection = Collections.emptyList();

    private static Map<String, String> map = new HashMap<>();

    public static void init() {
        collection.add("1");
        collection.add("3");
        collection.add("5");
        collection.add("7");
        collection.add("9");
        collection.add("2");
        collection.add("4");
        collection.add("6");
        collection.add("8");

        map.put("1", "1");
        map.put("3", "3");
        map.put("5", "5");
        map.put("7", "7");
        map.put("9", "9");
        map.put("2", "2");
        map.put("4", "4");
        map.put("6", "6");
        map.put("8", "8");

    }

    public static void main(String[] args) {
        init();

        foreachCollection();

        System.out.println("======================");

        filterCollection();
    }


    public static void foreachCollection() {

        collection.forEach(v ->
                System.out.println(v)
        );

    }

    public static void filterCollection() {


    }

    public static void foreachMap() {


    }

    public static void filterMap() {


    }

}
